//
//  UIView+Extension.swift
//  SinaWeibo
//
//  Created by liyue on 15/11/17.
//  Copyright © 2015年 李越. All rights reserved.
//

import UIKit

extension UIView {
    
    func NavController() -> UINavigationController? {
        
        var next = self.nextResponder()
        repeat {
            
            if next is UINavigationController {
                return next as? UINavigationController
            }
            next = next?.nextResponder()
        } while (next != nil)
        return nil
    }
}
